The Wee Green BASIC Language Handbook for Excel by Dennis Conroy

The Wee Green BASIC Language Handbook for Excel by Dennis Conroy

Author:Dennis Conroy [Conroy, Dennis]
Language: eng
Format: mobi
Tags: Excel, BASIC, VBA, Programming, COM051050, COM051200, COM051380
Published: 2011-12-17T16:00:00+00:00


' Step 4 - Use variable "Temp" to assemble written amount.

Let Temp = ""

If StrArray(4) <> "" Then

Let Temp = StrArray(4) + " Thousand"

End If

If StrArray(3) <> "" Then

Let Temp = Temp + " " + StrArray(3) + " Hundred"

End If

If StrArray(2) <> "" Then

Let Temp = Temp + " " + StrArray(2) + " And"

End If

Let Temp = Temp + " " + StrArray(1)

' Step 5 - Print assembled amount to cell.

Let Range("B6") = Temp

Exit Sub

The complete program is listed below:

Sub Check()

' This program converts numerical dollars to a written character amount. Limit $99,999.00

Dim NumArray(1 To 4) As Integer

Dim StrArray(1 To 4) As String

Dim NumLoc As String

Dim Temp As String

Dim X As Double

Let NumLoc = Range("I5") 'Spreadsheet location of number to be converted.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.